import request from '@/utils/request'
export default{
    //借款审批
    borrowInfoApproval(data){
        return request({
            url: "/admin/core/borrowInfo/approval",
            method: "PUT",
            data,
          })
    },
    //id查询借款详情
    getBorrowInfoById(id){
        return request({
            url:`/admin/core/borrowInfo/${id}`,
            method:'GET'
        })
    },
    //条件分页查询借款列表
    queryBorrows(pageNum,pageSize,searchObj){
        return request({
            url:`/admin/core/borrowInfo/${pageNum}/${pageSize}`,
            method:'GET',
            params:searchObj
        })
    },
    //条件分页查询借款人列表
    page(pageNum,pageSize,key){
        return request({
            url:`/admin/core/borrower/${pageNum}/${pageSize}`,
            method:'GET',
            params:{key} //key是条件检索字符串
        })
    },
    //根据id查询借款人详情
    getById(id){
        return request({
            url:`/admin/core/borrower/${id}`,
            method:'GET'
        })
    },
    approval(data){
        return request({
            url:`/admin/core/borrower/approval`,
            method:'POST',
            data
        })
    }
}